use serde::{Deserialize, Serialize};
use utoipa::ToSchema;

/// 角色创建
#[derive(Debug, Serialize, Deserialize, ToSchema)]
pub struct RoleCreate {
    /// 名称
    pub name: String,
    /// 描述
    pub desc: Option<String>,
}

/// 角色修改
#[derive(Debug, Serialize, Deserialize, ToSchema)]
pub struct RoleUpdate {
    /// id
    pub id: i32,
    /// 名称
    pub name: String,
    /// 描述
    pub desc: Option<String>,
}

/// 角色绑定
#[derive(Debug, Serialize, Deserialize, ToSchema)]
pub struct RoleBind {
    /// 角色id
    pub id: i32,
    /// 权限id集合
    pub perm_ids: Vec<i32>,
}
